package com.cloudfun.campusshare.repo.sql;


import cn.hutool.core.util.StrUtil;

public class SqlUtils {
    public final static String TO_DAY_24_LIST= StrUtil.format(" SELECT @s \\:= @s + 1 AS `index`, DATE_FORMAT( DATE_SUB( DATE_SUB( curdate( ), INTERVAL {} DAY ), INTERVAL - @s HOUR ), '%Y-%m-%d %H' ) AS `time` FROM mysql.help_topic, (SELECT @s \\:= - 1 ) temp WHERE @s < 23 ORDER BY `time`","0");
    public final static String YESTER_DAY_24_LIST=StrUtil.format(" SELECT @s \\:= @s + 1 AS `index`, DATE_FORMAT( DATE_SUB( DATE_SUB( curdate( ), INTERVAL {} DAY ), INTERVAL - @s HOUR ), '%Y-%m-%d %H' ) AS `time` FROM mysql.help_topic, (SELECT @s \\:= - 1 ) temp WHERE @s < 23 ORDER BY `time`","1");
}
